package gson.stream.exception;

import com.google.gson.stream.MalformedJsonException;

public class MalformedJsonExceptionExample {

    // 使用单一的错误消息创建 MalformedJsonException
    public MalformedJsonException createMalformedJsonException(String msg) {
        return new MalformedJsonException(msg);
    }

    // 使用错误消息和原因创建 MalformedJsonException
    public MalformedJsonException createMalformedJsonException(String msg, Throwable throwable) {
        return new MalformedJsonException(msg, throwable);
    }

    // 使用 Throwable 创建 MalformedJsonException
    public MalformedJsonException createMalformedJsonException(Throwable throwable) {
        return new MalformedJsonException(throwable);
    }
}
